package com.bhkj.pdjhbgnewproject.core.viewmodel;

import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.MutableLiveData;
import android.arch.lifecycle.ViewModel;

import com.bhkj.pdjhbgnewproject.common.bean.PersonInfoBean;

public class MainViewRealModel extends ViewModel {
    private MutableLiveData<PersonInfoBean> mPersonInfoLiveData = new MutableLiveData<>();

    public void setPersonInfo(PersonInfoBean personInfo) {
        if (mPersonInfoLiveData == null) {
            mPersonInfoLiveData = new MutableLiveData<>();
        }
        mPersonInfoLiveData.setValue(personInfo);
    }

    public LiveData<PersonInfoBean> getPersonInfoLiveData() {
        return mPersonInfoLiveData;
    }
}
